<template>
 <div>
  <h1>goods</h1>
  <!-- ducks -->
  <el-button @click="getData">点击请求数据</el-button>
 </div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
export default {
  data() {
    return {
      list: []
    }
  },
  computed: {
    ...mapGetters(['goodsList'])
  },
  methods: {
    ...mapActions('goods', ['GetGoodsList']),
    getData() {
      this.GetGoodsList()
    }
  },
  watch: {
    goodsList(v) {
      console.log('v:', v)
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
